/*
 * @Author: your name
 * @Date: 2021-05-31 10:31:31
 * @LastEditTime: 2021-06-04 15:38:07
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \bazai_island_api\app.js
 */
require('module-alias/register')

const Koa = require('koa')
const koaBody = require('koa-body')
const InitManager = require('./core/init')
const app = new Koa()
const catchError = require('./middlewares/exception')

require('./app/models/user')
// require('./app/models/book-comment')
// require('./app/models/favor')

app.use(catchError)
app.use(koaBody())
InitManager.initCore(app)

// 应用程序对象，中间件

// 发送HTTP KOA 接收HTTP

// 函数

// 注册中间件


app.listen(3000, () => {
    console.log('server port in 3000');
})
